home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / 3d / raystorm-complete / examples / exa.lha / arexx / coin.ray < prev    next >
Text File  |  1996-07-27  |  934b  |  55 lines

  1. /***************
  2.  * NAME:        coin.ray
  3.  * DESCRIPTION: Jumping coin animation with motion blur
  4.  * AUTHOR:      Andreas Heumann
  5.  ***************/
  6.  
  7. signal on error
  8.  
  9. options results
  10.  
  11. IF ~show('P','RAYSTORM') THEN DO
  12.     address COMMAND 'run >NIL: <NIL: /RayStorm'
  13.     address COMMAND WaitForPort RAYSTORM
  14. END
  15.  
  16. address RAYSTORM
  17.  
  18. 'OBJECTPATH /objects'
  19.  
  20. 'SETSCREEN 160 128'
  21. 'SETCAMERA <0,4,9> <0,3.5,0> <0,1,0> 68.75 55'
  22. 'SETWORLD [0,0,100]'
  23. 'POINTLIGHT <0,4,9> SHADOW'
  24.  
  25. 'NEWACTOR COIN <3,0.1,0>'
  26.  
  27. frames = 30
  28. vy = .8
  29. y = 1
  30. do i=0 to frames
  31.     'POSITION '-i' 'i+1' <'3-((i+1)/(frames/6))','y',0>'
  32.     y = y + vy
  33.     vy = vy - (1.724/frames)
  34.     'ALIGNMENT 'i' 'i+1' <0,0,'24*(i+1)'>'
  35. end
  36.  
  37. 'LOADOBJ coin.iob <-3,0,0> <0,0,0> <1,1,1> ACTOR=COIN'
  38.  
  39. 'DISTRIB 3'
  40.  
  41. do i=0 to frames
  42.     'STARTRENDER QUICK FROM 'i' TO 'i+1
  43.     'SAVEPIC coin' || RIGHT(i+1,4,0) || '.iff'
  44. end
  45.  
  46. 'CLEANUP'
  47.  
  48. exit 0
  49.  
  50. error:
  51. say "Error" rc "in line" sigl ":"
  52. GETERRORSTR rc
  53. say result
  54. exit 0
  55.